##### readme for replication materials for 
##### Estimating Onsets of Binary Events in Panel Data
##### Liam F. McGrath
##### liam.mcgrath@ir.gess.ethz.ch

The replication materials are ordered in the following folders:

- code: all code necessary to replicate the analysis and results in the paper
- data: data necessary to conduct the sensitivity analysis of 
        Hegre and Sambanis 2006 in the paper
- output: output from the Monte Carlos and sensitivity analysis in the paper

Below I provide a brief description of each file, going folder by folder.

# Code Files

- eba_hs_analysis.R: this code analyses the results of the sensitivty analysis
                     based upon Hegre and Sambanis 2006. This produces figure
                     6 in the main text, and table 5 in the appendix.
                     Requires the results of the sensitivity analysis located
                     in the output folder.
- eba_hs_run.R: this code performs the sensitivity analysis on determinants
                of civil war onset based upon Hegre and Sambanis 2006. This
                produces the results of the sensitivity analysis located in
                the output folder. This code requires the Hegre and Sambanis
                data (hs_data.dta) located in the data folder.
- mc_analysis.R: this code analyses the results of the Monte Carlo experiments.
                 This produces figures 1-5 and table 3 in the main text,
                 plus figures 7-9 in the appendix. This code requires the 
                 results of the Monte Carlos (collected_props.csv) located in the output folder.
- mc_run.R: this code performs the Monte Carlo experiments. This produces the
            results of the experiments located in the output folder.
- multiplot.R: this code defines a function to combine plots.

# Data files

- hs_data.dta: the replication data of Hegre and Sambanis 2006
- vars.csv: variable names for all the variables considered as potential
            determinants of the onset of civil war by Hegre and Sambanis

# Output files

- collected_props.csv: the results of the monte carlo experiments, generated
                       by mc_run.R
- scenarios.csv: the scenarios used in the monte carlo experiments, generated
                 by mc_run.R
- summaries.RData: the results of the sensitivity analysis, generated by
                   eba_hs_run.R